<!--
作者: 陈圳佳
日期: 2015/8/17
时间: 15:37
--->
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@include file="../../commons/inc.jsp" %>
<ul class="breadcrumb">
    <li>外部管理</li>
    <li class="active">管理供应商</li>
</ul>
<div class="container">
    <div class="panel panel-info">
        <div class="panel-heading">
            <div id="search">
                <form class="form-inline" role="form">
                    <div class="form-group">
                        <div class="input-group">
                            <div class="input-group-addon">供应商名称</div>
                            <input type="text" class="form-control input-sm" name="name"
                                   id="supplier">
                        </div>
                    </div>
                    <div class="form-group">
                        <div class="input-group">
                            <div class="input-group-addon">供应商地址</div>
                            <input class="form-control input-sm" type="text" name="address"
                                   id="address">
                        </div>
                    </div>
                    <button type="submit" class="btn btn-info btn-sm">
                        <span class="glyphicon glyphicon-search"></span> 搜索
                    </button>
                    <a class="btn btn-inverse btn-sm" href="1.html" data-pjax="#content">
                        <span class="glyphicon glyphicon-refresh"></span> 重置
                    </a>
                    <button type="button" class="btn btn-primary btn-sm"
                            onclick="showEditDialog
('${ctx}/manage/supplier/edit.html?desc=dialog')">
                        <span class="glyphicon glyphicon-plus"></span> 添加供应商
                    </button>
                </form>
            </div>
        </div>
        <div>
            <table class="table table-condensed table-striped table-hover table-bordered" ng-controller="ListCtrl">
                <thead>
                <tr>
                    <th>序号</th>
                    <th>名称</th>
                    <th>电话</th>
                    <th>联系人</th>
                    <th>地址</th>
                    <th>开户姓名</th>
                    <th>开户账号</th>
                    <%--<th>状态</th>--%>
                    <th>备注</th>
                    <th>操作</th>
                </tr>
                </thead>
                <tbody>
                <c:forEach items="${pageVo.data}" var="p">
                    <tr>
                        <td style="vertical-align: middle; width: 60px">${p.id}</td>
                        <td style="vertical-align: middle">${p.supplierName}</td>
                        <td style="vertical-align: middle">${p.tel}</td>
                        <td style="vertical-align: middle">${p.contact}</td>
                        <td style="vertical-align: middle">${p.address}</td>
                        <td style="vertical-align: middle">${p.openName}</td>
                        <td style="vertical-align: middle">${p.account}</td>
                        <%--<td style="vertical-align: middle">${p.delStatus}</td>--%>
                        <td style="vertical-align: middle">${p.remark}</td>
                        <td class="btn-group-xs" width="150">
                            <button type="button" class="btn btn-warning"
                                    onclick="showEditDialog('${ctx}/manage/supplier/${p.id}.html?desc=dialog')">
                                <span class="glyphicon glyphicon-pencil"></span> 修改
                            </button>
                            <button type="button" class="btn btn-danger" ng-click="del('${ctx}/manage/supplier/${p.id}')">
                                <span class="glyphicon glyphicon-trash"></span> 删除
                            </button>
                        </td>
                    </tr>
                </c:forEach>
                </tbody>
            </table>
            <div id="pagination" class="pagination pagination-sm">
                ${pageVo.pageNumHtml}
            </div>
        </div>
    </div>
</div>
<script>
    globalObj.callback = function () {
        $("#address").val(getQueryString('address'));
        $("#supplier").val(getQueryString('name'));
        $("#search").find("form").submit(function () {
            var vals = "?" + $(this).serialize();
            $.pjax({url: vals, container: '#content'});
            return false;
        });
    };
</script>


